home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 8: LINUX Games / Linux Cubed Series 8 - LINUX Games.iso / games / x11 / rpg / crossfir.92 / crossfir / crossfire-0.92.5 / utils / crossloop < prev    next >
Text File  |  1996-07-24  |  566b  |  25 lines

  1. #!/bin/sh
  2. #
  3. # This is a replacement for the crosserv.pl perl script.,
  4. # No point in using perl for such a simple task.
  5.  
  6. CMDNAME="BINDIR/crossfire"
  7. maxrestart=100
  8. logdir="/tmp/crosservlog"
  9.  
  10. logcount=0
  11.  
  12. #rm -rf $logdir
  13. #mkdir $logdir
  14.  
  15. while [ ! "$logcount"x = "$maxrestart"x ]; do
  16.   echo "Starting Crossfire `date` for the $logcount time..." 1>$logdir/$logcount 2>&1
  17.   $CMDNAME -d -f -server 2>>$logdir/$logcount 1>&2
  18.   if [ -f core ] ; then
  19.         mv core core.$logcount
  20.         /usr/local/bin/gzip core.$logcount
  21.   fi
  22.   logcount=`expr $logcount + 1`
  23.   sleep 5
  24. done
  25.